package com.googlecode.jtoy.patterns.mediator;

public class MediatorTest {

	/**
	 * @param args
	 */
	public static void main(String[] args) {

		Mediator med = new Mediator();
		Anchor anchor = new Anchor(med);
		Guest guest = new Guest(med);
		med.regAnchor(anchor);
		med.regGuest(guest);

		System.out.println(">>>anchor will speak...");
		anchor.speak();

		System.out.println(">>>guest will speak...");
		guest.speak();

		System.out.println(">>>anchor will stop...");
		anchor.stop();

		System.out.println(">>>guest will speak...");
		guest.speak();

		System.out.println(">>>anchor will speak...");
		anchor.speak();
	}
}
